package com.kaifamiao.demo.d0811;

import java.util.Iterator;

public class Test {

    public static void main(String[] args) {
        MyList list = new MyList();


        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");
        list.add("e");
        list.add("f");

//        Iterator iterator = list.iterator();
//
//        while(iterator.hasNext()){
//            System.out.println(iterator.next());
//        }

        for (Object obj : list){
            System.out.println(obj);
        }

    }
}
